supplier Java
Creates a result supplier from config values. Since configs are by design mutable in-game, the result should freshly inspect the value on every get()
.
If the
thing
is aValidatedField
or otherwise a supplier of values, it can be used directly to provide a supplier of valuesIf the
thing
is a basic primitive or object, theproperty
should be used to supply values from the field getter
Using this general strategy ensures that fresh values are supplied on every call.
Return
Supplier<T> supplier instance for retrieving values from the config scope provided.
Author
fzzyhmstrs
Since
0.5.3
Parameters
String representation of a config setting. See the translation wiki page for an overview of how scopes work.
Config the config instance providing results
Any the candidate result to potentially use to create the supplier with.